package value

import (
	"tongquetai_server/share/infrastructure/utils/json"
)

type VersionString string

func (v VersionString) Version() string {
	extraStruct := struct {
		Version string `json:"version"`
	}{}

	err := json.JsonUnmarshalString(string(v), &extraStruct)
	if err != nil {
		return ""
	}

	return extraStruct.Version
}
